using System;
using System.Collections.Generic;
namespace Biomedica.Propability.StateMachine
{
	public class StateContext {

        public Dictionary<string, Object> EnvirunmentCollection {set;get;}
        public State CurrentState { get; set; }
        public StateContext()
        {
            EnvirunmentCollection = new Dictionary<string, object>();
        }
        private StateMachineEngine Eng;
        /** set The Current State Engine That belong to this Context **/
        public void setStateMachineEngine(StateMachineEngine eng)
        {
                Eng=eng;
        }
        /** get the Current State Engine That belong to this **/
        public StateMachineEngine getStateMachineEngine()
        {
                return Eng;
        }
        internal void initEnvirunments()
        {
            EnvirunmentCollection = new Dictionary<string, Object>();

        }
        public void Update(String key, bool val)
        {
            EnvirunmentCollection[key] = val;
        }

        public void initaliseTable(string[] p)
        {
            for (int i = 0; i < p.Length; i++) 
                EnvirunmentCollection.Add(p[i], false);
        }
    }

}
